home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: watzka@stat.uni-muenchen.de (Kurt Watzka)
- Newsgroups: comp.lang.c
- Subject: Re: qsort on Solaris
- Date: 18 Apr 1996 13:44:21 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4l5gvl$b9s@sparcserver.lrz-muenchen.de>
- References: <3175A2A3.1664EB7F@montefiore.ulg.ac.be>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
-
- Louis Bronne <bronne@montefiore.ulg.ac.be> writes:
-
- >Hello !
-
- >I'm experiencing big trouble with qsort on Solaris.
-
- I have used qsort() on Solaris without any problems.
-
- >My program runs well on Linux (GNU qsort) but the Solaris qsort
- >has a very strange behaviour. By instance, when it has to sort
- >only two elements, it does a comparison between the element 0 and 1
- >(normal !) but does it twice !
- >After that, it begins to compare the elements -1, -2, -3 etc. with the
- >0th one.
-
- >So a happy "Segmentation fault" rises !
-
- >Any idea ?
-
- How did you find that out? While I can verify your observation that
- qsort() compares the two elements of a two element array twice, I
- cannot verify the other observation.
-
- Post the code that makes you think that qsort "violates boundaries".
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
-